Ext.namespace("Issue.Main");

Issue.Main.tabIndex = {
	"toimp" : 0,
	"toimportant" : 1,
	"tofulfill" : 2,
	"search" : 3
};
Issue.Main.tabs = [];

Issue.initUI = function() {
					var opentab = Utils.getParameter('opentab');
				if (!opentab) opentab = "toimp";	
				// init tabs
				Issue.Main.tabs.push(new Issue.ToImp());	
				//Issue.Main.tabs.push(new Issue.ToImportant());	
				Issue.Main.tabs.push(new Issue.ToFulfill());
				Issue.Main.tabs.push(new Issue.Search());
				Issue.instance = new Ext.TabPanel({
					region: 'center',
					activeTab: Issue.Main.tabIndex[opentab],
					items: Issue.Main.tabs
				});
				
				var mainview = new Ext.Viewport({
			        layout:'border',
			        items:[Issue.instance]
			    });
}

Ext.onReady(function(){
	Ext.QuickTips.init();
    Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
	Issue.initUI();
});

